package com.nhutcm.trackingthief.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.nhutcm.trackingthief.fragment.ScreenStepOne;
import com.nhutcm.trackingthief.fragment.ScreenStepThree;
import com.nhutcm.trackingthief.fragment.ScreenStepTwo;

/**
 * Adapter cua viewpager
 * 
 * @author Chau Minh Nhut
 * @version 1.0
 * @since 13/10/2013
 *
 */
public class PagerAdapter extends FragmentPagerAdapter {

	private static int TAB_COUNT = 3;
	Context mContext;

	public PagerAdapter(FragmentManager fm, Context context) {
		super(fm);
		mContext = context;
	}
	
	@Override
	public Fragment getItem(int tabPosition) {
		Fragment f;
		switch (tabPosition) {
		case 0:
			f = new ScreenStepOne();
			break;
		case 1:
			f = new ScreenStepTwo();
			break;
		case 2:
			f = new ScreenStepThree();
			break;
		default:
			return null;
		}

		return f;
	}

	@Override
	public int getCount() {
		return TAB_COUNT;
	}

	
}
